[qemu] Use qemu's -vnc option to specify the interface to listen on.
authorChristian Limpach <Christian.Limpach@xensource.com>
Thu, 10 May 2007 14:02:05 +0000 (15:02 +0100)
committerChristian Limpach <Christian.Limpach@xensource.com>
Thu, 10 May 2007 14:02:05 +0000 (15:02 +0100)
Domain config files still use the original syntax with vnc and vnclisten.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
tools/python/xen/xend/image.py

index bec78012e09cc53ec6fdb9f9daf21695d236bf7c..361c420c486ed191e5fe2670e4f9ddd5c72314d9 100644 (file)
@@ -387,18 +387,14 @@ class HVMImageHandler(ImageHandler):
                     if key in vmConfig['platform']:
                         vnc_config[key] = vmConfig['platform'][key]
 
-            if not vnc_config.get('vncunused', 0) and \
-                   vnc_config.get('vncdisplay', 0):
-                vncdisplay = vnc_config.get('vncdisplay')
-                ret.append('-vnc')
-                ret.append(str(vncdisplay))
-            else:
-                ret.append('-vncunused')
-
             vnclisten = vnc_config.get('vnclisten',
                                        xenopts().get_vnclisten_address())
-            ret.append('-vnclisten')
-            ret.append(str(vnclisten))
+            vncdisplay = vnc_config.get('vncdisplay', 0)
+            ret.append('-vnc')
+            ret.append("%s:%d" % (vnclisten, vncdisplay))
+            
+            if vnc_config.get('vncunused', 0):
+                ret.append('-vncunused')
 
             # Store vncpassword in xenstore
             vncpasswd = vnc_config.get('vncpasswd')